package com.jcl.recruit.config.service;

import com.jcl.recruit.config.mapper.ConfigMapper;
import com.jcl.recruit.config.mapper.PullDownConfigMapper;
import com.jcl.recruit.config.model.Config;
import com.jcl.recruit.config.model.PullDownConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 刘明新
 * @date 2018/8/2 下午1:19
 */
@Service
public class ConfigService implements ConfigMapper {

    @Autowired
    private ConfigMapper configMapper;

    @Autowired
    private PullDownConfigMapper pullDownConfigMapper;

    @Override
    public List<Config> selectAllInfos() {
        return configMapper.selectAllInfos();
    }

    @Override
    public Config selectPrimaryKey(Integer id) {
        return configMapper.selectPrimaryKey(id);
    }

    @Override
    public int update(Config config) {
        return configMapper.update(config);
    }

    public List<PullDownConfig> selectAllConfigs(){
        return pullDownConfigMapper.selectAllConfigs();
    }
}
